package xyz.xuminghai.javafx_learn.scene.control;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TitledPane;
import javafx.stage.Stage;

/**
 * 2023/5/24 2:25 星期三<br/>
 * TitledPane 是一个带有标题的面板，可以打开和关闭。
 *
 * @author xuMingHai
 */
public class TitledPaneApp extends Application {

    private final TitledPane titledPane = new TitledPane("title", new Button("button"));

    public static void main(String[] args) {
        Application.launch(args);
    }

    @Override
    public void start(Stage primaryStage) {
        primaryStage.setTitle(getClass().getSimpleName());
        Scene scene = new Scene(titledPane, 800, 600);
        primaryStage.setScene(scene);
        primaryStage.show();
    }
}
